﻿<Window
    x:Class="Rosetta.Viewer.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:c="clr-namespace:Rosetta.Composition;assembly=Rosetta.Composition"
    xmlns:controls="clr-namespace:Rosetta.Controls;assembly=Rosetta.Controls"
    Title="Rosetta Viewer" Height="563" Width="1024">
    <Grid>
        <Grid.Resources>
            <!-- Show Description, Results, Arguments,... -->
            <DataTemplate DataType="{x:Type c:Node}">
                <Border Margin="10,0,10,0" BorderBrush="DarkGray" BorderThickness="1" CornerRadius="6" Width="200" Height="125">
                    <Border.Style>
                        <Style TargetType="Border">
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding IsValid}" Value="True">
                                    <Setter Property="Background" Value="LightBlue" />
                                </DataTrigger>    
                            </Style.Triggers>
                            
                            <Setter Property="Background" Value="Red" />
                        </Style>
                    </Border.Style>
                    
                    <StackPanel>
                        <TextBlock Margin="6" Text="{Binding AddIn.Name}" />
                        <TextBlock Margin="6" Text="{Binding MethodEntry.Name}" />
                    </StackPanel>
                </Border>
            </DataTemplate>
        </Grid.Resources>

        <controls:TemplateViewer x:Name="PART_viewer" Margin="10" />

    </Grid>
</Window>